package dao;

import java.util.ArrayList;

import transferobject.Item;

/**
 * Item DAO interface. This interface
 * needs to be implemented by the all ItemDAO
 * @author Ilya_Poliakov
 */
public interface ItemDao {
	/**
	 * @return user ID
	 */
	public int insertItem(Item item);
	/**
	 * Delete item by itemId
	 * @return item was deleted
	 */
	public boolean deleteItem(int itemId);
	/**
	 * Searching for item by item ID
	 * @return item Transfer Object
	 */
	public Item findItemById(int itemId);
	/**
	 * Searching for items by title
	 * @return item Transfer Object
	 */
	public ArrayList<Item> findItemsByTitle(String title);
	/**
	 * Find items by description substring
	 * @return list of items
	 */
	public ArrayList<Item> findItemsByDescription(String description);
	/**
	 * Update item
	 * @return item has been updated
	 */
	public boolean updateItem(Item item);
	/**
	 * Return all items
	 * @return list of all items
	 */
	public ArrayList<Item> getAllItems();

}
